const wearDao = require('../dao/wearDao');

async function findByKind(kind) {
    if(kind=={}||kind==[]||kind==undefined||kind==null){
        kind = 'kid'
    }
    try{
        //查询衣服
        var data = await wearDao.findByKind(kind);
        // console.log('service data:'+data);
        return {success:true,wears:data}
    }catch (e) {
        return {success:false,msg:'database is error'};
    }
}

exports.findByKind = findByKind;